package com.translate.web.dao;

import com.dao.base.IBaseMapper;
import com.translate.entity.Customer;

public interface CustomerMapper extends IBaseMapper<Customer> {

    /**
	 * 统计公海成员数量
	 * @param poolId
	 * @return
	 */
	int countByCustomerSeaNumber(int poolId);
	
	public int getNewlyAdded(long start, long end, int userId) ;
	
	public int getVisitedCustomers(int userId, long start, long end) ;

	public int getFollowUpCustomers(int userId, long start, long end) ;

	public int getClosedCustomers(int userId, long start, long end) ;
	
	public int getCustomersWhoDidNotFollowUpInATimelyManner(int userId, long start, long end) ;
	
	/**
	 * 更新最后跟进记录
	 * @param time
	 * @param id
	 * @return
	 */
	int updateLastFlowTime(long time, int id);
	
	
	/**
	 * 分配客户
	 * @param customerId
	 * @param seaId
	 * @param userId
	 * @return
	 */
	int allocationCustomer(int customerId, int seaId, int userId);
}